package com.cjl.jvm.up;

public  class A{
    int a = 0;
    /*volatile*/ boolean flag = false;

    public void inA(){
        a = 1;
        flag = true;
    }

    public void inB(){
        if (flag){
            int i = a*a;
            System.out.println("A.inB i="+i);
        }
    }
}
